import {
  get,
  post,
  put,
  del,
  baseUrl
} from "./request"

export const ApigetPage = (url) => get(url)

export const Apilogin = (params) => post("/api/user/user/code2session", params)

//专科护理
export const ApiGetSpecialList = () => get("/api/user/home/hotItems")

export const ApiSpecialList = (params) => get("/api/user/home/itemList", params)

//获取到专科护理详情页面
export const ApiItemDetail = (id) => get("/api/user/home/itemDetail/" + id)



//保存用户信息
export const ApiEditUserInfo = (id, params) => post("/api/user/user/changeUserInfo/" + id, params)
//查看联系人
export const ApiContactList = () => get("/api/user/user/contactList", )
//添加联系人
export const ApiAddContact = (params) => post("/api/user/user/createContact", params)
//修改联系人
export const ApiEditContact = (id, params) => post("/api/user/user/updateContact/" + id, params)
// 删除联系人
export const ApiDelContact = (id) => del("/api/user/user/deleteContact/" + id)





//查看就诊人
export const ApiPatientCardList = () => get("/api/user/user/patientCardList", )

//添加就诊人
export const ApiAddPatient = (params) => post("/api/user/user/createPatientCard", params)

//修改就诊人
export const ApiEditPatient = (id, params) => post("/api/user/user/updatePatientCard/" + id, params)

// 删除就诊人
export const ApiDelPatient = (id) => del("/api/user/user/deletePatientCard/" + id)

/* ocalhost:91/api/user/user/deletePatientCard/:cardId */

//获取验证码
export const ApiCaptchaCode = (params) => post("/api/user/user/getCaptchaCode", params)
//验证码登录
export const ApiCaptchaCodeLogin = (params) => post("/api/user/user/captchaCodeLogin", params)
//修改密码
export const ApiChangePassword = (params) => post("/api/user/user/changePassword", params)

//检验验证码
export const ApiCheckCaptchaCode = (params) => post("/api/user/user/checkCaptchaCode", params)

//修改手机号
export const ApiChangePhone = (params) => post("/api/user/user/changePhone", params)



//订单下单
export const ApiOrder = (params) => post("/api/user/order/order", params)


// 订单列表
export const ApiOrderList = (params) => get("/api/user/order/orderList", params)

//订单支付
export const ApiOrderPay = (id) => post("/api/user/order/pay/" + id)
//取消订单
export const ApiCancelPay = (id, params) => post("/api/user/order/cancelOrder/" + id, params)

//立即评价订单
export const ApiOrderUserComment = (data) => post("/api/user/order/orderUserComment", data)
//查看评价订单
export const ApiSearchComment = (id) => get("/api/user/order/orderCommentList/" + id)
//我的评价
export const ApiMyComment = () => get("/api/user/order/myComment")
//延期申请保存(医护端)
export const ApiOrderDelayApply = (data) => post("/api/doctor/order/orderDelayApply", data)
//处理延期
export const ApiOrderDelayList = () => get("/api/user/order/orderDelayList")
//申请保存
export const ApiOrderDelayHandle = (data) => post("/api/user/order/orderDelayHandle", data)






// 人员列表
export const Apieventrecord = (params) => get("/api/eventrecord", params)
// api/eventrecord?page=1&size=25&total=0




export const ApihandleById = (params, id) => post("/api/eventrecord/handle/" + id, params)

// 上传文件
export const ApiUpload = (params) => post("/api/common/upload", params)


// 拍摄文件提交
export const ApiEventUploadFile = (params) => post("/api/eventrecord/wx/uploadFile", params)

export const ApiGetLocation = (params) => post("/api/user/report/location", params)

export const Apicontactor = () => get("/api/user/member/department")


export const ApisendSms = () => post("/api/eventrecord/sos/sendSms")


export const ApiUser = (params) => get("/api/user", params)

export const ApiAllocation = (id, params) => post("/api/eventrecord/allocation/" + id, params)

export const ApiReview = (id, params) => post("/api/eventrecord/review/" + id, params)

// export const ApiReview = (id, params) => post("/api/eventrecord/review/" + id, params)

export const ApiPhone = (params) => get("/api/person/searchList", params)
// /api/person/searchList?phone=1

// api/eventrecord/review/24

//获取分类信息
export const ApiCategoryList = () => get("/api/user/home/categoryList")

//认证身份证
export const ApiUserRealNameCheck = (data) => post("/api/user/user/userRealNameCheck", data)

//获取接单时间列表
export const ApiGetOrderTimeList = () => get("/api/user/order/getOrderTimeList")

//获取客服联系方式
export const getCustomerPhone = () => get("/api/user/user/getCustomerPhone")


//获取协议
export const getConfig = () => get("/api/admin/system/getConfig")


//获取投诉建议列表
export const getComplaint = () => get("/api/user/complaintList")
//投诉和建议
export const setComplaint = (data) => post("/api/user/complaint", data)



//补充订单支付

export const setPayExtend = (id) => post("/api/user/order/payExtend/" + id)


export const setGetUserInfo = () => get("/api/user/user/getUserInfo")

export const ApigetVipUnitList = (data) => get("/api/user/user/vipUnitList", data)

//待领取列表

export const ApiWaitReceiveCouponList = () => get("/api/user/user/waitReceiveCouponList")

//立即领取

export const ApiReceiveCoupon = (id) => post("/api/user/user/receiveCoupon/" + id)

//获取我的优惠券
export const ApiGetmyCoupon = (data) => get("/api/user/user/myCoupon", data)